package com.siki.pojo.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Setter;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

/**
 * @Author Siki
 * @Date 2020/3/19
 */

@Data
@Setter
@TableName( value= "gq_user",resultMap = "UserResult")
public class User {
    @Id
    @GenericGenerator(name = "idGenerator", strategy = "uuid")
    @GeneratedValue(generator = "idGenerator")
    @ApiModelProperty("角色id")
    private String id;

    @ApiModelProperty("报名时间")
    @JsonFormat(pattern = "UTC+8")
    Date createTime;

    @ApiModelProperty("姓名")
    private String name;

    @ApiModelProperty("性别")
    private String userSex;

    @ApiModelProperty("报名岗位")
    @OneToMany(cascade = CascadeType.REFRESH,mappedBy = "user")
    @TableField(exist = false)
    private List<DepartmentInformation> departmentInformationList;

    @ApiModelProperty("自我介绍")
    private String selfIntroduction;//自我介绍

    @ApiModelProperty("对莞青的认识")
    private String remark;      //备注

    @ApiModelProperty("电话")
    private String phone;

    @ApiModelProperty("微信")
    private String weChat;

    @ApiModelProperty("学号")
    private String number;      //学号

    @ApiModelProperty("班级信息")
    private String classInfo;   //班级信息

    @ApiModelProperty("邮箱")
    private String email;


    @ApiModelProperty("头像url")
    private String avatarUrl;
}
